
# 1. Copy Input file from source to binary dir
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/magnet.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/magnet.yaml COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/emc2d4.yaml
               ${CMAKE_CURRENT_BINARY_DIR}/emc2d4.yaml COPYONLY)

# 2. Name the test with the directory name
get_filename_component(testName ${CMAKE_CURRENT_SOURCE_DIR} NAME)

# 3. Create the test with this name and standard executable
add_test(NAME ${testName}_magnet  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=magnet.yaml)
add_test(NAME ${testName}_emc2d4  COMMAND ${CMAKE_BINARY_DIR}/siyuan --i=emc2d4.yaml)
